package top.ezzz.util.processtype;

import top.ezzz.model.ProcessInfo;

import java.util.List;

public class ProcessContext {
    private TypeInterface strategy;

    public ProcessContext(TypeInterface strategy) {
        this.strategy = strategy;
    }

    public void setStrategy(TypeInterface strategy) {
        this.strategy = strategy;
    }

    public List<ProcessInfo> monitor() {
        if (strategy == null) {
            //return "未设置策略";
            return null;
        }
        return strategy.getProcessList();
    }
}
